<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script>
		var flag = 0;
		document.write("1~100的素数:");
	for(var i = 1; i <= 100; i++){
		for(var j = 2; j < i; j++){
			if(i % j ==0){
					flag = 1;
			break;
				}
			else{
				flag = 0;
				}
			}
			if(flag == 0 && i != 1){
			document.write(i + " ");
			}
		}
		</script>
	</body>
</html>
